package ai.leinao.notify.dingtalk.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * description
 *
 * @author zhong.wang
 * @date 2025/7/11
 */
@AllArgsConstructor
@Getter
public enum DingTalkMessageType {
    TEXT("text", "文本"),
    MARKDOWN("markdown", "markdown");
    /**
     * 类型
     */
    private final String type;

    /**
     * 描述
     */
    private final String desc;

    public static DingTalkMessageType getDingTalkMessageType(final String type) {
        for (DingTalkMessageType value : DingTalkMessageType.values()) {
            if (value.getType().equals(type)) {
                return value;
            }
        }
        return null;
    }
}
